package com.asyf.demo.demo.el;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author yjz
 * @Date 2023/1/29 17:27
 */
public class UserFactory {

    public static User buildUser() {
        User user = new User(1, "张三");
        List<Role> roleList = new ArrayList<Role>() {{
            add(new Role(1, "管理员"));
            add(new Role(2, "销售员"));
            add(new Role(2, "销售员2"));
            add(new Role(3, "技术员"));
        }};
        user.setRoleList(roleList);
        return user;
    }
}
